<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <meta http-equiv="X-UA-Compatible" content="ie=edge">
  <title>Document</title>
  <link rel="stylesheet" href="./font/iconfont.css">
  <style>
    .box {
      width: 100px;
      height: 90px;
      background: #eee;
      border-radius: 5px;
      position: relative;
      margin-top: 100px;
      border: solid 2px #eee;
      transition: background 1s ease;
    }
    .email {
      width: 100px;
      height: 90px;
      line-height: 90px;
      text-align: center;

    }
    .email .icon-email {
      color: #ccc;
      transition: color 1s ease-in;
    }
    .iconfont {
      font-size: 64px;
    }

    .round {
      position: absolute;
      width: 40px;
      height: 40px;
      transform: scale(0);
      background: #12cc87;
      border-radius: 50%;
      line-height: 40px;
      text-align: center;
      top: -15px;
      right: -15px;
      transition: all 1s;
    }
    .round .icon-duihao {
      font-size: 0;
      color: #fff;
      transition: font-size .5s linear .5s;
    }
    

    .active.box {
      background: #fff;
    }
    
    .active .email .icon-email {
      color: #000;
    }

    .active .round {
      transform: scale(1);
    }
    .active .icon-duihao {
      font-size: 28px;
    }
  </style>
</head>
<body>
  <div class="box">
    <div class="email">
      <i class="iconfont icon-email"></i>
    </div>
    <div class="round">
      <i class="iconfont icon-duihao"></i>
    </div>
  </div>

  <script>
    document.onclick = function () {
      document.querySelector('.box').classList.add('active')
    }
  
  </script>
</body>
</html>